using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace JointEffort_Gallery
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class HUDElements : GameScreen
    {
        Game g;
        SpriteBatch sb;
        SpriteFont sf;
        int scoreLevel, scoreTotal, stage, lives, ammo;
        public float time;

        public HUDElements(Game game)
            : base(game)
        {
            // TODO: Construct any child components here
            g = game;
        }

        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {
            // TODO: Add your initialization code here

            base.Initialize();
        }

        protected override void LoadContent()
        {
            base.LoadContent();
        }

        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // TODO: Add your update code here

            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            sb = Game.Services.GetService(typeof(SpriteBatch)) as SpriteBatch;
            sf = Game.Services.GetService(typeof(SpriteFont)) as SpriteFont;
            sb.Begin();
            //Draw remaining time in level, current level, and score
            sb.DrawString(sf, scoreLevel.ToString(), new Vector2(g.Window.ClientBounds.Width/2,g.Window.ClientBounds.Height/2), Color.White);
            sb.End();
            base.Draw(gameTime);
        }
    }
}
